package com.dt.platform.oa.page;

import org.github.foxnic.web.framework.view.controller.ViewController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import com.dt.platform.proxy.oa.FinReimburseItemServiceProxy;
import javax.servlet.http.HttpServletRequest;
/**
 * <p>
 * 报销明细模版页面控制器
 * </p>
 * @author 金杰 , maillank@qq.com
 * @since 2025-06-06 08:00:58
*/

@Controller("OaFinReimburseItemPageController")
@RequestMapping(FinReimburseItemPageController.prefix)
public class FinReimburseItemPageController extends ViewController {

	public static final String prefix="business/oa/fin_reimburse_item";

	private FinReimburseItemServiceProxy proxy;

	/**
	 * 获得代理对象<br>
	 * 1、单体应用时，在应用内部调用；<br>
	 * 2、前后端分离时，通过配置，以Rest方式调用后端；<br>
	 * 3、微服务时，通过feign调用; <br>
	 * */
	public FinReimburseItemServiceProxy proxy() {
		if(proxy==null) {
			proxy=FinReimburseItemServiceProxy.api();
		}
		return proxy;
	}

	/**
	 * 报销明细 功能主页面
	 */
	@RequestMapping("/fin_reimburse_item_list.html")
	public String list(Model model,HttpServletRequest request,String ownerId,String pageType) {
		model.addAttribute("ownerId",ownerId);
		model.addAttribute("pageType",pageType);
		return getTemplatePath(prefix,"fin_reimburse_item_list");
	}

	/**
	 * 报销明细 表单页面
	 */
	@RequestMapping("/fin_reimburse_item_form.html")
	public String form(Model model,HttpServletRequest request , String id,String pageType,String ownerId) {
		model.addAttribute("ownerId",ownerId);
		model.addAttribute("pageType",pageType);
		return getTemplatePath(prefix,"fin_reimburse_item_form");
	}
}